package com.corpcredit.model;

// Generated Jul 22, 2008 11:56:54 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

/**
 * Hyfl generated by hbm2java
 */
@Entity
@Table(name = "hyfl", uniqueConstraints = @UniqueConstraint(columnNames = "hyfl"))
public class Hyfl implements java.io.Serializable
{

    private Long id;
    private int version;
    private String username;
    private String operation;
    private Date optdate;
    private long hyfl;
    private String hyflmc;
    private Set<Jbqk> jbqks = new HashSet<Jbqk>( 0 );
    private Set<Hyfx> hyfxes = new HashSet<Hyfx>( 0 );
    private Set<Pdfl1> pdfl1s = new HashSet<Pdfl1>( 0 );

    public Hyfl()
    {
    }

    public Hyfl( Long id, long hyfl, String hyflmc )
    {
        this.id = id;
        this.hyfl = hyfl;
        this.hyflmc = hyflmc;
    }

    public Hyfl( Long id,
                 String username,
                 String operation,
                 Date optdate,
                 long hyfl,
                 String hyflmc,
                 Set<Jbqk> jbqks,
                 Set<Hyfx> hyfxes,
                 Set<Pdfl1> pdfl1s )
    {
        this.id = id;
        this.username = username;
        this.operation = operation;
        this.optdate = optdate;
        this.hyfl = hyfl;
        this.hyflmc = hyflmc;
        this.jbqks = jbqks;
        this.hyfxes = hyfxes;
        this.pdfl1s = pdfl1s;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false)
    @GeneratedValue(strategy=GenerationType.AUTO)
    public Long getId()
    {
        return this.id;
    }

    public void setId( Long id )
    {
        this.id = id;
    }

    @Version
    @Column(name = "version", nullable = false)
    public int getVersion()
    {
        return this.version;
    }

    public void setVersion( int version )
    {
        this.version = version;
    }

    @Column(name = "username", length = 50)
    public String getUsername()
    {
        return this.username;
    }

    public void setUsername( String username )
    {
        this.username = username;
    }

    @Column(name = "operation", length = 20)
    public String getOperation()
    {
        return this.operation;
    }

    public void setOperation( String operation )
    {
        this.operation = operation;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "optdate", length = 23)
    public Date getOptdate()
    {
        return this.optdate;
    }

    public void setOptdate( Date optdate )
    {
        this.optdate = optdate;
    }

    @Column(name = "hyfl", unique = true, nullable = false)
    public long getHyfl()
    {
        return this.hyfl;
    }

    public void setHyfl( long hyfl )
    {
        this.hyfl = hyfl;
    }

    @Column(name = "hyflmc", nullable = false, length = 50)
    public String getHyflmc()
    {
        return this.hyflmc;
    }

    public void setHyflmc( String hyflmc )
    {
        this.hyflmc = hyflmc;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "hyfl")
    public Set<Jbqk> getJbqks()
    {
        return this.jbqks;
    }

    public void setJbqks( Set<Jbqk> jbqks )
    {
        this.jbqks = jbqks;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "hyfl")
    public Set<Hyfx> getHyfxes()
    {
        return this.hyfxes;
    }

    public void setHyfxes( Set<Hyfx> hyfxes )
    {
        this.hyfxes = hyfxes;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "hyfl")
    public Set<Pdfl1> getPdfl1s()
    {
        return this.pdfl1s;
    }

    public void setPdfl1s( Set<Pdfl1> pdfl1s )
    {
        this.pdfl1s = pdfl1s;
    }

}
